'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.bulkInsert('quality_inspection', [
      {
        plan_number: 'XST2508220384',
        license_plate: '冀J5S588',
        driver: '18630710017-张攀',
        driver_name: '张攀',
        driver_phone: '18630710017',
        material: '70#沥青',
        print_time: new Date('2025-08-22 20:13:02'),
        weigh_time: new Date('2025-08-22 20:08:26'),
        images: JSON.stringify([
          {
            url: 'https://via.placeholder.com/200x200/007AFF/FFFFFF?text=质检单1',
            id: '1'
          },
          {
            url: 'https://via.placeholder.com/200x200/FF9500/FFFFFF?text=质检单2',
            id: '2'
          }
        ]),
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      },
      {
        plan_number: 'XST2508220385',
        license_plate: '冀J5S589',
        driver: '18630710018-李四',
        driver_name: '李四',
        driver_phone: '18630710018',
        material: '90#沥青',
        print_time: new Date('2025-08-22 21:15:30'),
        weigh_time: new Date('2025-08-22 21:10:15'),
        images: JSON.stringify([]),
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      }
    ]);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('quality_inspection', null, {});
  }
};
